package com.example.management.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.management.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    List<User> listAll();
    @Cacheable(value = "userCache", key = "#id")
    User selectById(Long id);
}
